*/
/* Sort descending by gap and position. */
-
g_qsort_with_data (spreading,
nvis_children, sizeof (GtkBoxSpreading),
gtk_box_compare_gap, sizes);
/* Distribute available space.
* This master piece of a loop was conceived by Behdad Esfahbod.
*/
- for (i = nvis_children - 1; i >= 0; --i)
+ for (i = nvis_children - 1; size > 0 && i >= 0; --i)
{
/* Divide remaining space by number of remaining children.
* Sort order and reducing remaining space by assigned space
/* Distribute available space.
* This master piece of a loop was conceived by Behdad Esfahbod.
*/
- for (i = nvis_children - 1; i >= 0; --i)
+ for (i = nvis_children - 1; size > 0 && i >= 0; --i)
{
/* Divide remaining space by number of remaining children.
* Sort order and reducing remaining space by assigned space